From 70c57c2d2ef88ce69dce5bbf10c7f52bbce1c4b5 Mon Sep 17 00:00:00 2001 From: "sos22@douglas.cl.cam.ac.uk" Date: Thu, 10 Feb 2005 16:49:23 +0000 Subject: [PATCH] bitkeeper revision 1.1164 (420b9093tZfwUqS7PQW_U7NLqOc72Q) Make sure we disable the watchdog while we're in the debugger. --- xen/arch/x86/cdb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/cdb.c b/xen/arch/x86/cdb.c index 1bb50ab9de..73fefeb26f 100644 --- a/xen/arch/x86/cdb.c +++ b/xen/arch/x86/cdb.c @@ -4,6 +4,8 @@ /* We try to avoid assuming much about what the rest of the system is doing. In particular, dynamic memory allocation is out of the question. */ +/* Resuming after we've stopped used to work, but more through luck + than any actual intention. It doesn't at the moment. */ #include #include #include @@ -14,7 +16,7 @@ /* Printk isn't particularly safe just after we've trapped to the debugger. so avoid it. */ -#define dbg_printk +#define dbg_printk(...) static unsigned char opt_cdb[30] = "none"; string_param("cdb", opt_cdb); @@ -319,6 +321,7 @@ __trap_to_cdb(struct xen_regs *regs) static atomic_t xendbg_running = ATOMIC_INIT(1); static char recv_buf[4096]; unsigned flags; + unsigned old_watchdog; if (xdb_ctx.serhnd < 0) { dbg_printk("Debugger not ready yet.\n"); @@ -349,6 +352,8 @@ __trap_to_cdb(struct xen_regs *regs) } smp_send_stop(); + old_watchdog = watchdog_on; + watchdog_on = 0; /* Shouldn't really do this, but otherwise we stop for no obvious reason, which is Bad */ @@ -374,6 +379,7 @@ __trap_to_cdb(struct xen_regs *regs) ASSERT(!local_irq_is_enabled()); } } + watchdog_on = old_watchdog; atomic_inc(&xendbg_running); local_irq_restore(flags); } -- 2.30.2